<template>
	<view class="flex-row y-center x-center loading-wrapper" :style="{background:bgColor}">
		<u-loading-icon color="#999" size="30"></u-loading-icon>
	</view>
</template>

<script>
	export default {
		name: "uni-loading",
		props: {
			bgColor: {
				type: String,
				default: 'transparent'
			}
		},
		data() {
			return {
				isShow: true
			};
		},
		methods: {
			show() {
				this.isShow = true;
			},
			hide() {
				this.isShow = false;
			}
		}
	}
</script>

<style scoped lang="scss">
	.loading-wrapper {
		position: fixed;
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;
		z-index: 999;
	}
</style>